package com.itlong.cloud.property.dao;

import com.itlong.cloud.POJO.VO.property.BankCardInfoVO;
import com.itlong.cloud.POJO.VO.property.PropertyBankManageGetPageVO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      物业银行卡管理数据访问接口
 * </desc>
 */
@Repository
@Mapper
public interface IPropertyBankCardManageDao extends IAbstractBaseDao{
    /**
     * <desc>
     *      修改数据
     * </desc>
     *
     * @param params 数据参数
     * @return
     * @author Jiaqi.X
     * @createDate 2018/08/17
     */
    Integer update(Map<String,Object> params);

    /**
     * <desc>
     *      保存缴费录入数据
     * </desc>
     *
     * @param params 数据参数
     * @return
     * @author Jiaqi.X
     * @createDate 2018/08/15
     */
    Integer save(Map<String, Object> params);

    /**
     * <desc>
     *      添加时获取物业银行手机号及支付密码信息
     * </desc>
     *
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    Map<String,Object> getBankPayConf(@Param("projectId") String projectId);

    /**
     * <desc>
     *      验证银行账户唯一性
     * </desc>
     *
     * @param bankCardNo 银行卡号
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    Integer checkBankCardOnly(@Param("bankCardNo") String bankCardNo,@Param("bankCardId") String bankCardId);

    /**
     * <desc>
     *      删除银行卡
     * </desc>
     *pr
     * @param bankCardId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    Integer deleteBankCard(@Param("bankCardId") String bankCardId);

    /**
     * <desc>
     *      获取银行卡账号详情
     * </desc>
     *
     * @param bankCardId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    BankCardInfoVO getBankCardInfo(@Param("bankCardId") String bankCardId);

    /**
     * <desc>
     *      查询项目下是否绑定手机号
     * </desc>
     *
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    String getProjectBankPhone(@Param("projectId") String projectId);

    /**
     * <desc>
     *      设置支付密码
     * </desc>
     *
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    Integer setPayPassword(@Param("projectId") String projectId,@Param("payPassword") String payPassword);

    /**
     * <desc>
     *      添加手机号
     * </desc>
     *
     * @param projectId
     * @param phoneNum
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/20
     */
    Integer setBankPhoneNum(@Param("projectId") String projectId,@Param("phoneNum") String phoneNum);

    /**
     * <desc>
     *     查询分页列表
     * </desc>
     *
     * @param params
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/21
     */
    List<PropertyBankManageGetPageVO> getPage(Map<String,Object> params);

    /**
     * <desc>
     *     查询分页列表
     * </desc>
     *
     * @param params
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/21
     */
    Integer getPageCount(Map<String,Object> params);

    /**
     * <desc>
     *      获取银行名称
     * </desc>
     *
     * @param bankName
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/27
     */
    List<Map<String,Object>> getBanks(@Param("bankName") String bankName);

    /**
     * <desc>
     *      获取物业银行卡列表
     * </desc>
     *
     * @param projectId
     * @return
     * @author Jiaqi.X
     * @createDate 2018/09/27
     */
    public List<Map<String, Object>> getBankCards(String projectId);
}
